<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Setting environment variables</title>
<link rel="stylesheet" type="text/css" href="../help.css">
</head>

<body>

<div role="main"><h1>Setting environment variables</h1>

<p>You can set the environment variables and values to use when an application 
runs.</p>

<p>To set environment variables:</p>

<ol>
  <li>In  the C/C++ Projects view, select a project.</li>
  <li>Click <strong>Run &gt; Run</strong> or <strong>Run &gt; Debug</strong>.</li>
  <li>In the <strong>Configurations</strong> box, expand <strong>C/C++ Local</strong>.</li>
  <li>Select a run or debug configuration.</li>
  <li>Click the <strong>Environment</strong> tab..<br>
  	  <img src="../images/run_environment.png" alt="Run Environment Window">
  </li>  
  <li>Do one of the following:
  	<ul>
		<li>To create a new environment variable, click <strong>New</strong>.</li>
		<li>To import an environment variable, click <strong>Import</strong>.</li>
  		<li>To edit an existing environment variable, select an item from the list and click <strong>Edit</strong>.</li>
		<li>To remove an existing environment variable, select an item from the list and click <strong>Remove</strong>.</li>
	</ul>
    <li>Type a name in the <strong>Name</strong> box.</li>
    <li>Type a value in the <strong>Value</strong> box.</li>  
  <li>Click <strong>Run</strong> or do the following, as required:<ul><li>To specify the 
    execution arguments that an application uses and to specify the working directory for a run 
    configuration, see <a href="cdt_t_run_arg.htm">Specifying execution arguments</a>.</li>
  <li>To select a debugger to use when debugging an application, see
  <a href="cdt_t_run_dbg.htm">Selecting a debugger</a></li>
  <li>To specify the location of source files used when debugging a C or C++ 
  application, see <a href="cdt_t_run_source.htm">Specifying the location of 
  source files</a></li>
  <li>To specify where the run configuration is stored, how you access it, and 
  the perspective to open when running an application, see
  <a href="cdt_t_run_com.htm">Specifying the location of the run configuration</a></li></ul>
    
  </ol>

<p><img src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
<br>
<a href="../concepts/cdt_c_projects.htm">CDT Projects</a><br>
<a href="../concepts/cdt_c_proj_file_views.htm">Project file views</a></p>
<p><img src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
<br>
<a href="cdt_o_run_config.htm">Creating or editing a run configuration</a></p>
<p><img src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
<br>
<a href="../reference/cdt_o_run_dbg_pages.htm">Run and Debug dialog box</a></p>
<img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >

</div></body>

</html>